import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  mode: 'hash',
  routes: [
    {
      path: '/login',
      name: 'login',
      meta: {
        index: 1,
        title: "管理员登录"
      },
      component: () => import('../view/login.vue')
    },
    {
      path: '/',
      name: 'page',
      meta: {
        index: 0,
        title: "page"
      },
      component: () => import('../view/page.vue'),
      children: [
        {
          path: '/',
          name: 'mainPage',
          meta: {
            index: 1,
            title: "预览官网"
          },
          component: () => import('../view/mainPage.vue')
        },
        {
          path: '/page/messageList',
          name: 'messageList',
          meta: {
            index: 1,
            title: "留言管理"
          },
          component: () => import('../view/messageList.vue')
        },
        {
          path: '/page/basicInfo',
          name: 'basicInfo',
          meta: {
            index: 1,
            title: "公司信息"
          },
          component: () => import('../view/basicInfo.vue')
        },
        {
          path: '/page/setUp',
          name: 'setUp',
          meta: {
            index: 1,
            title: "系统设置"
          },
          component: () => import('../view/setUp.vue')
        },
        {
          path: '/page/editCont',
          name: 'editCont',
          meta: {
            index: 1,
            title: "编辑文章"
          },
          component: () => import('../view/editCont.vue')
        },
        {
          path: '/page/editList1',
          name: 'editList1',
          meta: {
            index: 1,
            title: "分类管理"
          },
          component: () => import('../view/editList1.vue')
        },
        {
          path: '/page/editList2',
          name: 'editList2',
          meta: {
            index: 1,
            title: "分类管理"
          },
          component: () => import('../view/editList2.vue')
        },
        {
          path: '/page/editList1_1',
          name: 'editList1_1',
          meta: {
            index: 1,
            title: "文章管理"
          },
          component: () => import('../view/editList1_1.vue')
        },
        {
          path: '/page/editList2_1',
          name: 'editList2_1',
          meta: {
            index: 1,
            title: "文章管理"
          },
          component: () => import('../view/editList2_1.vue')
        },
        {
          path: '/page/editList3',
          name: 'editList3',
          meta: {
            index: 1,
            title: "分类管理"
          },
          component: () => import('../view/editList3.vue')
        }

      ]
    }
  ]
})
